The set of dialog items you find in the “Event” view varies from application to application. However, two items stay unchanged: the “L.Fact.” field, and “Condition” popup menu.
Unlike nodes, an event does not necessarily have to be calculated in every simulation run. DynRisk allows you to attach a condition to each event. The condition is defined by the “L.Fact.” field and the “Condition” popup menu. When the condition is not satisfied, no message is sent to the target application, and the output value of the event is zero.
The following condition types are available:
• On all runs
• On large input
• On small input
• On random
• On even runs
• On odd runs
• On init
The “On all runs” option implies that the event is calculated in every simulation run. In this case the “L.Fact.” is not used at all.
“On large input” means that the event will only be calculated if the sum of the input values is strictly greater than the value of the “L.Fact.” field.
“On small input” means that the event will only be calculated if the sum of the input values is strictly smaller than the value of the “L.Fact.” field.
If the “On random” option is selected, then the “L.Fact” field is interpreted as a probability. Thus, when using this option, you should specify a number between 0 and 1 in this field. In each simulation run the event will be calculated with probability equal to the number you specify.
“On even runs” means that the event is only calculated every second simulation run starting at run 2. Thus, the event will be calculated in run 2, 4, 6, …, and not calculated in run 1, 3, 5, …. In this case the “L.Fact.” field is not used at all.
“On odd runs” means that the event is only calculated every second simulation run starting at run 1. Thus, the event will be calculated in run 1, 3, 5, …, and not calculated in run 2, 4, 6, …. In this case the “L.Fact.” field is not used at all.
If the “On init” option is selected, the event is only calculated during initialization. The initialization is carried out before any actual simulation is done. At this early stage there is no data flow through the model. Thus, in particular, there are no input values coming in to the event from its predecessors, and no output values being passed on to its successors. To understand what the event does, we need to know what category the event belongs to:
If the event is a “Send data” event, then it sends its “L.Fact.” value. During the actual simulations, the event will pass zero on to each of its successors.
If the event is a “Receive data” event, it stores the received value. During the actual simulations, the event will pass this value on to each of its successors (instead of just zero). In this case the “L.Fact.” field is not used at all.
If the event is a “Send and receive data” event, it sends its “L.Fact.” value, and stores the received value. During the actual simulations the event will pass this value on to each of its successors (instead of just zero).
If the event is a “Trigger action” event, the event simply send the trigger message. During the actual simulations the event will pass zero on to each of its successors. In this case the “L.Fact.” field is not used at all.